package com.zzy.face.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.persistence.*;

/**
 * @Author 朱泽玉
 * @Create 2022/1/29  10:23
 * @Description 返校、离校申请
 * @Modified By:
 */
@Data
@Entity
public class RLSchool {
    @Id
    @JsonSerialize(using = ToStringSerializer.class)
    private Long uid;

    //返校/离校
    private int type;

    //返校/离校时间
    private String date_time;

    //审核状态
    private int state;

    //交通方式
    private int method;

    //车次
    private String train_number;

    //出发/目的地点
    private String place;

    @OneToOne(mappedBy = "rlSchool")
    private Approval approval;

    @ManyToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "student_uid")
    private Student student;

    @ManyToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "teacher_uid")
    private Teacher teacher;
}
